From 8ad6d3829b5372c4cfa1962273ee5211982b2f17 Mon Sep 17 00:00:00 2001 From: "kaf24@freefall.cl.cam.ac.uk" Date: Mon, 1 Nov 2004 17:51:58 +0000 Subject: [PATCH] bitkeeper revision 1.1159.1.326 (418677bearNwfvI3AaLxMG1OKQfO9A) Better do_softirq(). We know that there is at least one softirq pending on entry, so we cget rid of the initial test for zero. --- xen/common/softirq.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/xen/common/softirq.c b/xen/common/softirq.c index 166a8163c1..7c7e6cc636 100644 --- a/xen/common/softirq.c +++ b/xen/common/softirq.c @@ -23,12 +23,14 @@ asmlinkage void do_softirq() { unsigned int i, pending, cpu = smp_processor_id(); - while ( (pending = softirq_pending(cpu)) != 0 ) - { + pending = softirq_pending(cpu); + ASSERT(pending != 0); + + do { i = find_first_set_bit(pending); clear_bit(i, &softirq_pending(cpu)); (*softirq_handlers[i])(); - } + } while ( (pending = softirq_pending(cpu)) != 0 ); } void open_softirq(int nr, softirq_handler handler) -- 2.30.2